A5Storage::SecurityImpersonation AddRemoteServerDomain Method
Syntax
.AddRemoteServerDomain as System::Void (DomainName as C, ServerName as C, UserName as C, Password as C, ShareName as C)
Arguments
- DomainNameCharacter
The domain name on the remote share that the user belongs to.
- ServerNameCharacter
The name of the remote server.
For remote servers connected over TCP/IP, using facilities such as SMB, this value may be an IP address or a DNS name.- UserNameCharacter
The name of user that is assigned for the remote share.
- PasswordCharacter
The password required to log the user on to the remote share.
- ShareNameCharacter
The file share published by the server named above.
Description
This function adds a remote server and share to the local windows context, handling any logon required. If the share is already available with the same credentials, calling the function a second time does not return an error.
Example
dim Sec as A5Storage::SecurityImpersonation dim Server as c = "ec2-3-91-243-228.compute-1.amazonaws.com" Dim ShareName as C = "myshare" dim Domain as C = "sgw-6FC21806" dim User as C = "smbguest" dim Password as C = "xxxxxxxx" dim UseName as C = "\\\" + Server + "\\" + ShareName Sec.AddRemoteServerDomain(Domain, Server, User, Password, ShareName) ?Sec.CallResult.text s = FILE.To_String(UseName + "\test\source\foo.txt") ?s